<?php defined('SYSPATH') or die('No direct script access.');

$ss						= Session::instance();
//$alert_views	= Arr::get($_POST,'alert_views');
//$alert_views	= 'notification';
$alert_views	= NULL;

// Load the Alert Message
//$message_text	= $ss->get('message_text');
//$message_code	= $ss->get('message_code');
$message_text	= $ss->get_once('message_text');
$message_code	= $ss->get_once('message_code');
?>

<?php if ($message_text > '') { ?>
<style type="text/css">

</style>

<?php
	switch($alert_views)
	{
		case 'notification':
				// Using Notification
				?>
					<script type="text/javascript"> 
					function alert_exist() {
					document.getElementById('mainAlert').click();
					}
					window.onload = alert_exist; 
					</script>
					
					<button id="mainAlert" class="btn hidden noty" data-noty-options='{"text":"<?php echo $message_text; ?>","layout":"top","type":"alert","animateOpen": {"opacity": "show"}}'>$nbsp;</button>
				<?php
				break;
	
		default:
				// Using Alerts
				?>
					<div class="alert alert-block <?php echo $message_code; ?> pull-none span8" style="margin: 0px auto 10px auto; text-align: center;">
						<button type="button" class="close" data-dismiss="alert">&times;</button>
						<table border="0" cellspacing="0" cellpadding="0" align="center">
							<tr>
								<td width="70" align="center"><?php echo HTML::image('assets/global/images/warning.png')?></td>
								<td align="left"><?php echo $message_text; ?></td>
							</tr>
						</table>						
					</div>
				<?php
				break;
	}
}








